Skip to content

add nginx content cache as cache policy #8005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Conversation

vepatel
Copy link
Contributor

@vepatel vepatel commented Jul 9, 2025

Proposed changes

  • Adds implementation for Nginx content caching using Policy and VS/VSR
  • Adds helm changes for volumes in deployments and sessionAffinity in services
  • Adds an deployable example
  • Adds unit tests
  • Adds python tests

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@github-actions github-actions bot added enhancement Pull requests for new features/feature enhancements go Pull requests that update Go code labels Jul 9, 2025
@vepatel vepatel linked an issue Jul 9, 2025 that may be closed by this pull request
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 94.69697% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.35%. Comparing base (4ef38ae) to head (8337f42).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/configs/virtualserver.go 90.54% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8005      +/-   ##
==========================================
+ Coverage   53.10%   53.35%   +0.24%     
==========================================
  Files          90       90              
  Lines       21778    21909     +131     
==========================================
+ Hits        11565    11689     +124     
- Misses       9738     9742       +4     
- Partials      475      478       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Aug 7, 2025

Package Report

gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx, 1.27.5-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-module-njs, 1.27.5+0.8.10-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-module-otel, 1.27.5+0.1.2-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 3.0.3~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx, 1.27.5-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-module-njs, 1.27.5+0.8.10-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-module-otel, 1.27.5+0.1.2-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 3.0.3~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 3.0.3~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 3.0.3~bookworm, arm64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-appprotect, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-attack-signatures, 2025.08.07-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-threat-campaigns, 2025.08.11-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 2.42.1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-appprotect, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-module-plus, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-plugin, 6.16.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 2.42.1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-appprotectdos, 34+4.6.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-dos, 34+4.6.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus, 34-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-njs, 34+0.8.9-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-otel, 34+0.1.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-fips-check, 34+0.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-appprotect, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect, 34+5.442.0-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-attack-signatures, 2025.08.07-2~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-threat-campaigns, 2025.08.11-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-plus-module-appprotectdos, 34+4.6.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, app-protect-dos, 34+4.6.1-1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9, nginx-agent, 2.42.1~bookworm, amd64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx, 1.27.5-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-module-njs, 1.27.5.0.8.10-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-module-otel, 1.27.5.0.1.2-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-agent, 3.0.3, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx, 1.27.5-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-module-njs, 1.27.5.0.8.10-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-module-otel, 1.27.5.0.1.2-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-agent, 3.0.3, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus, 34-r2, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-njs, 34.0.8.9-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-otel, 34.0.1.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-fips-check, 34.0.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-agent, 3.0.3, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus, 34-r2, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-njs, 34.0.8.9-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-otel, 34.0.1.1-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-plus-module-fips-check, 34.0.1-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine, nginx-agent, 3.0.3, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus, 34-r2, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-njs, 34.0.8.9-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-otel, 34.0.1.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-fips-check, 34.0.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-agent, 3.0.3, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus, 34-r2, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-njs, 34.0.8.9-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-otel, 34.0.1.1-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-fips-check, 34.0.1-r1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-agent, 3.0.3, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus, 34-r2, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-njs, 34.0.8.9-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-otel, 34.0.1.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-fips-check, 34.0.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-agent, 2.42.1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-appprotect, 34.5.442.0-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, app-protect, 34.5.442.0-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, app-protect-attack-signatures, 2025.08.07-r2, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, app-protect-threat-campaigns, 2025.08.11-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus, 34-r2, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-njs, 34.0.8.9-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-otel, 34.0.1.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-fips-check, 34.0.1-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-agent, 2.42.1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, nginx-plus-module-appprotect, 34.5.442.0-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, app-protect-module-plus, 34.5.442.0-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-alpine-fips, app-protect-plugin, 6.16.0-r1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx, 1.27.5-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-module-njs, 1.27.5+0.9.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-module-otel, 1.27.5+0.1.2-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 3.0.3-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx, 1.27.5-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-module-njs, 1.27.5+0.9.0-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-module-otel, 1.27.5+0.1.2-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 3.0.3-1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 3.0.3-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 3.0.3-1, aarch64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 2.42.1-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-appprotect, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-attack-signatures, 2025.08.07-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-threat-campaigns, 2025.08.11-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 2.42.1-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-appprotect, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-module-plus, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-plugin, 6.16.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus, 34-2.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-njs, 34+0.8.9-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-otel, 34+0.1.1-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-fips-check, 34+0.1-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-agent, 2.42.1-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-appprotect, 34+5.442.0-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, app-protect, 34+5.442.0-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, app-protect-attack-signatures, 2025.08.07-2.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, app-protect-threat-campaigns, 2025.08.11-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus, 34-2.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-njs, 34+0.8.9-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-otel, 34+0.1.1-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-fips-check, 34+0.1-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-agent, 2.42.1-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, nginx-plus-module-appprotect, 34+5.442.0-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, app-protect-module-plus, 34+5.442.0-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-nap-v5/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi8, app-protect-plugin, 6.16.0-1.el8.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-appprotectdos, 34+4.6.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-dos, 34+4.6.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus, 34-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-njs, 34+0.8.9-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-otel, 34+0.1.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-fips-check, 34+0.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-appprotect, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-plus-module-appprotectdos, 34+4.6.1-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, nginx-agent, 2.42.1-1, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect, 34+5.442.0-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-attack-signatures, 2025.08.07-2.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-threat-campaigns, 2025.08.11-1.el9.ngx, x86_64
gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-dos-nap/nginx-plus-ingress:t-eda5bada34f825fdd8aa1e6d20c111d9-ubi, app-protect-dos, 34+4.6.1-1.el9.ngx, x86_64

@github-actions github-actions bot added the python Pull requests that update Python code label Aug 12, 2025
@vepatel vepatel marked this pull request as ready for review August 13, 2025 12:31
@vepatel vepatel requested a review from a team as a code owner August 13, 2025 12:31
@@ -838,6 +849,7 @@ func (vsc *virtualServerConfigurator) GenerateVirtualServerConfig(
StatusMatches: statusMatches,
LimitReqZones: removeDuplicateLimitReqZones(limitReqZones),
AuthJWTClaimSets: removeDuplicateAuthJWTClaimSets(authJWTClaimSets),
CacheZones: cacheZones,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might the zones need deduping?

Copy link
Contributor Author

@vepatel vepatel Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vepatel vepatel requested review from pdabelf5 and a team August 13, 2025 14:45
@danielnginx danielnginx requested a review from Copilot August 14, 2025 12:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for NGINX content caching through a new cache Policy resource that can be applied to VirtualServer and VirtualServerRoute configurations. The implementation provides comprehensive caching capabilities including configurable cache zones, response code filtering, HTTP method restrictions, cache TTL settings, and NGINX Plus-specific features like cache purging.

  • Adds new Cache policy type supporting cache zones, response codes, HTTP methods, TTL, and purging capabilities
  • Extends VirtualServer and VirtualServerRoute configuration to support cache policies at spec and route levels
  • Includes Helm chart enhancements for shared cache volumes and session affinity configuration

Reviewed Changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/apis/configuration/v1/types.go Adds Cache struct definition with all caching configuration options
pkg/apis/configuration/validation/policy.go Implements validation logic for cache policy fields and NGINX Plus features
internal/configs/virtualserver.go Integrates cache policy processing into VirtualServer configuration generation
internal/configs/version2/http.go Defines cache-related data structures for template rendering
charts/nginx-ingress/values.yaml Adds cache volume and session affinity configuration options
tests/suite/test_cache_policies_*.py Comprehensive test suite for cache policy functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if fieldCount != 1 {
msg := "must specify exactly one of: `accessControl`, `rateLimit`, `ingressMTLS`, `egressMTLS`, `basicAuth`, `apiKey`"
msg := "must specify exactly one of: `accessControl`, `rateLimit`, `ingressMTLS`, `egressMTLS`, `basicAuth`, `apiKey`, `cache`"
if isPlus {
msg = fmt.Sprint(msg, ", `jwt`, `oidc`, `waf`")
}
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message construction is duplicated and hardcoded in multiple places. Consider extracting the base policy types into a constant or function to reduce duplication and make it easier to maintain when new policy types are added.

Suggested change
}
msg := oneOfPolicyTypesError(isPlus)

Copilot uses AI. Check for mistakes.

@@ -1732,6 +1746,13 @@ func (vsc *virtualServerConfigurator) generatePolicies(
ownerDetails.vsName, policyOpts.secretRefs)
case pol.Spec.WAF != nil:
res = config.addWAFConfig(vsc.cfgParams.Context, pol.Spec.WAF, key, polNamespace, policyOpts.apResources)
case pol.Spec.Cache != nil:
res = newValidationResults()
if config.Cache != nil {
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The cache policy conflict detection logic should be extracted into a separate validation function. The warning message and conflict detection could be reused for other policy types that don't support multiple instances.

Copilot uses AI. Check for mistakes.

// Convert allowed codes to proxy_cache_valid entries
for _, code := range cache.AllowedCodes {
if cache.Time != "" {
if code.Type == intstr.String {
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number '1' for string type should be replaced with a named constant (intstr.String) for better readability and maintainability.

Copilot uses AI. Check for mistakes.

// Check if it contains "any" mixed with other codes (invalid)
hasAny := false
for i, code := range cache.AllowedCodes {
if code.Type == 1 && code.StrVal == "any" {
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number '1' for string type should be replaced with a named constant (intstr.String) for better readability and maintainability.

Suggested change
if code.Type == 1 && code.StrVal == "any" {
if len(cache.AllowedCodes) == 1 && cache.AllowedCodes[0].Type == intstr.String && cache.AllowedCodes[0].StrVal == "any" {
return allErrs // Valid: single "any" string
}
// Check if it contains "any" mixed with other codes (invalid)
hasAny := false
for i, code := range cache.AllowedCodes {
if code.Type == intstr.String && code.StrVal == "any" {

Copilot uses AI. Check for mistakes.


// Validate all elements are integers in the range 100-599
for i, code := range cache.AllowedCodes {
if code.Type == 1 { // String type
Copy link
Preview

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number '1' for string type should be replaced with a named constant (intstr.String) for better readability and maintainability.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements go Pull requests that update Go code python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache Policy - Implementation
2 participants